/*******************************************************************************
QQGame.cpp

	Author:		LiuDingXi
	e-mail:		liudx@gmail.com
	Date time:	2009-08-17

	Copyright (C) 2009
	All rights reserved.
	
*******************************************************************************/
#include "StdAfx.h"
#include "QQGame.h"
#include "GSound.h"


#if (_OS_ == _OS_WINNT_)
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
#endif//(_OS_ == _OS_WINNT_)

CQQGame::CQQGame()
{
}

CQQGame::~CQQGame()
{
}

BOOL CQQGame::Initialize(LPCTSTR szFolder, HGC hGC)
{
	if(GEngine::Initialize(szFolder, hGC))
	{
		// sound support
		/*
		m_pSound = new GSound();
		if(m_pSound && m_pSound->Initialize(szFolder))
		{
			m_pSound->MusicLoad(_T("welcome.mp3"));
			m_pSound->MusicPlay(TRUE);
		}
		*/

		return TRUE;
	}
	return FALSE;
}

BOOL CQQGame::Uninitialize()
{
	return GEngine::Uninitialize();
}

BOOL CQQGame::OnLoad()
{
	return LoadScene(&m_Login, _T("Login"));
}

BOOL CQQGame::OnQuit()
{
	if(m_pScene)
	{
		FreeScene(m_pScene);
		m_pScene = NULL;
	}
	return TRUE;
}


LONG CQQGame::OnChangeScene(GScene* pCurrent, LONG nCode)
{
	return nCode;
}
